<template>
  <div id="wf-join-users-set">
    <GroupPanel title="审批方式">
      <template #groupContent>
        <ul>
          <li><el-checkbox   label="单人单审" size="large" />  </li>
          <li><el-checkbox   label="多人单审" size="large" />  </li>
          <li><el-checkbox   label="多人并审" size="large" />  </li>
          <li><el-checkbox   label="多人串审" size="large" />  </li>
        </ul>
      </template>
    </GroupPanel>
  </div>
</template>
<script>
import {reactive, inject, toRefs} from 'vue'
import GroupPanel from "_c/common/group_panel.vue";

export default {
  name: "WfDesignJoinUsersSet",
  components: {
    GroupPanel
    // 注册组件
  },
  props: {
    // propWf: {
    //   type: Object,
    //   default: {}
    // }
  },
  emits: ['fWfDesignSaveCallback'],

  setup(props, context) {
    const wfBaseInfoSet = inject('wfBaseInfoSet')
    const stateData = reactive({
      wfBaseInfoRules: {
        form_file_name: [
          {required: true, message: '由于js选择文件无法获取完整路径, 请手动输入表单文件名', trigger: 'change'},
        ],
        wf_no: [
          {required: true, message: '请输入流程编码', trigger: 'change'},
        ],
        wf_name: [
          {required: true, message: '请输入流程名称', trigger: 'change'},
        ],
        wf_version: [
          {required: true, message: '请输入流程版本', trigger: 'change'},
        ],
      }
    })

    // 选择业务表单
    const fSelectFormFile = () => {
      // console.log('选择业务表单')
      wfBaseInfoSet.form_file_name = ''
    }


    const fSaveWf = () => {
      // 先执行 import() 确保加载完成
      // const module = await import(wfBaseInfoSet.form_file_name)
      console.log('module:', module)

      context.emit('fWfDesignSaveCallback')
    }


    return {
      ...toRefs(stateData),
      wfBaseInfoSet,
      fSelectFormFile,
      fSaveWf,
    }
  }
}
</script>

<style scoped>

</style>